from django.db import models
from utils.models import BaseModel


# Create your models here.


class Banner(BaseModel):
    name = models.CharField(max_length=32, verbose_name='图片名称')
    link = models.CharField(max_length=32, verbose_name='跳转路径')
    img = models.ImageField(upload_to='banner', blank=False, null=False, verbose_name='图片地址',help_text='图片长宽固定')

    def __str__(self):
        return self.name

    class Meta:
        db_table = 'luffy_banner'
        verbose_name_plural = '轮播图'
